package com.yilin.platform.entity.pab;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yilin.platform.base_core.application.BaseEntity;
import com.yilin.platform.base_core.application.CapitalBaseEntity;
import com.yilin.platform.base_core.application.FlowField;
import lombok.Getter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Entity
@Table(name = "pab_trade_record")
@TableName(value = "pab_trade_record")
public class PabTradeRecord extends CapitalBaseEntity {

    public enum PabTradeType {
        platPayment(0, "支付"),
        pubCollection(1, "收款");
        @EnumValue
        public Integer index;
        public String name;

        PabTradeType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    public enum PabTradeStatus {
        create(0, "创建"),
        success(1, "交易成功"),
        fail(2, "交易失败"),
        handle(3, "处理中");
        @EnumValue
        public Integer index;
        public String name;

        PabTradeStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
  
    @Column(name = "batch_no")
    private String batchNo;//批次单号
  
    @Column(name = "pab_trade_type")
    private PabTradeType pabTradeType;//交易类型
  
    @Column(name = "pab_trade_status")
    private PabTradeStatus pabTradeStatus;//交易状态

    @Column(name = "fail_msg")
    private String failMsg;//交易失败信息

    //发送时数据
  
    @Column(name ="out_acct_bank_node")
    private String outAcctBankNode;//付款人开户行行号
  
    @Column(name ="out_acct_bank_name")
    private String outAcctBankName;//付款人开户行名称
  
    @Column(name ="out_acct_addr")
    private String outAcctAddr;//付款人地址
    //-------------------------------------
  
    @Column(name ="in_acct_bank_node")
    private String inAcctBankNode;//收款人开户行行号 跨行转账建议必输

  
    @Column(name ="union_flag")
    private Boolean unionFlag;//跨行 true
  
    @Column(name ="in_acct_bank_name")
    private String inAcctBankName;//收款人开户行名称  * 【跨行建议】
  
    @Column(name ="in_acct_province_code")
    private String inAcctProvinceCode;//收款账户银行开户省代码或省名称 【跨行建议】
  
    @Column(name ="in_acct_city_name")
    private String inAcctCityName;//收款账户开户城市名称 【跨行建议】


    // 查询字段
  
    @Transient
    @TableField(exist = false)
    private String outBankShortName;// 转出行
  
    @Transient
    @TableField(exist = false)
    private String inBankShortName;// 转入行


    public String getFailMsg() {
        return failMsg;
    }

    public void setFailMsg(String failMsg) {
        this.failMsg = failMsg;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public PabTradeType getPabTradeType() {
        return pabTradeType;
    }

    public void setPabTradeType(PabTradeType pabTradeType) {
        this.pabTradeType = pabTradeType;
    }

    public PabTradeStatus getPabTradeStatus() {
        return pabTradeStatus;
    }

    public void setPabTradeStatus(PabTradeStatus pabTradeStatus) {
        this.pabTradeStatus = pabTradeStatus;
    }

    public String getOutAcctBankNode() {
        return outAcctBankNode;
    }

    public void setOutAcctBankNode(String outAcctBankNode) {
        this.outAcctBankNode = outAcctBankNode;
    }

    public String getOutAcctBankName() {
        return outAcctBankName;
    }

    public void setOutAcctBankName(String outAcctBankName) {
        this.outAcctBankName = outAcctBankName;
    }

    public String getOutAcctAddr() {
        return outAcctAddr;
    }

    public void setOutAcctAddr(String outAcctAddr) {
        this.outAcctAddr = outAcctAddr;
    }

    public String getInAcctBankNode() {
        return inAcctBankNode;
    }

    public void setInAcctBankNode(String inAcctBankNode) {
        this.inAcctBankNode = inAcctBankNode;
    }

    public Boolean getUnionFlag() {
        return unionFlag;
    }

    public void setUnionFlag(Boolean unionFlag) {
        this.unionFlag = unionFlag;
    }

    public String getInAcctBankName() {
        return inAcctBankName;
    }

    public void setInAcctBankName(String inAcctBankName) {
        this.inAcctBankName = inAcctBankName;
    }

    public String getInAcctProvinceCode() {
        return inAcctProvinceCode;
    }

    public void setInAcctProvinceCode(String inAcctProvinceCode) {
        this.inAcctProvinceCode = inAcctProvinceCode;
    }

    public String getInAcctCityName() {
        return inAcctCityName;
    }

    public void setInAcctCityName(String inAcctCityName) {
        this.inAcctCityName = inAcctCityName;
    }

    public String getOutBankShortName() {
        return outBankShortName;
    }

    public void setOutBankShortName(String outBankShortName) {
        this.outBankShortName = outBankShortName;
    }

    public String getInBankShortName() {
        return inBankShortName;
    }

    public void setInBankShortName(String inBankShortName) {
        this.inBankShortName = inBankShortName;
    }
}
